﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;

namespace BackgroundRunCmd
{
    class Program
    {
        static int Main(string[] args)
        {
            Console.WriteLine("hello world");
            if (args.Length == 0)
            {
                Console.WriteLine("缺少参数");
                return -1;
            }

            string subArgs = string.Join(" ", args.Skip(1));
            Process process = new Process();
            process.StartInfo = new ProcessStartInfo
            {
                FileName = args[0],
                Arguments = subArgs,
                CreateNoWindow = true,
                UseShellExecute = false,
                WindowStyle = ProcessWindowStyle.Hidden
            };
            process.Start();
            return 0;
        }
    }
}
